package com.example.springbootdemo.transactional;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class TransactionalDemo {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(TransactionalDemo.class, args);

        UserService userService = (UserService) applicationContext.getBean("userService");
        System.out.println(userService.UpdateAndGetUserById(2, "张三"));
    }
}
